﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsumoReadForm.aspx.cs" Inherits="UILGestion.Admin.InsumoReadForm1" %>
<%@ Register src="../../Control/menuCtrl.ascx" tagname="menuCtrl" tagprefix="uc1" %>
<%@ Register Assembly="ExtAspNet" Namespace="ExtAspNet" TagPrefix="ext" %>
<%@ Register assembly="WebLib" namespace="WebLib" tagprefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="InsumoListGrid.ascx" tagname="InsumoListGrid" tagprefix="uc2" %>

<%@ Register src="../../ObraAdmin/OrdenCompras/OrdenCompraInsumoGrid.ascx" tagname="OrdenCompraInsumoGrid" tagprefix="uc4" %>
<%--needed for WebMethods--%>
<%@ Import Namespace="System.Web.Script.Services" %>
<%@ Import Namespace="System.Web.Services" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
       <link href="../../css/main.css" rel="stylesheet" type="text/css" />
       <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/fonts.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/global.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/theme.css" />
 <script src="../../Scripts/jquery-1.5.2.min.js" type="text/javascript"></script>
     <script src="../../Scripts/SearchResult.js" type="text/javascript"></script>  
</head>
<body>
    <form id="form1" runat="server">
    <uc1:menuCtrl ID="menuCtrl1" runat="server" />

    <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"  EnablePartialRendering="true">
    </asp:ToolkitScriptManager>


     <asp:Panel ID="Panelcab" runat="server" Visible="false"
  CssClass="Heading secTitle AreaHeading ms-crm-List-Header">
  <asp:Label ID="tituloLabel" runat="server" Text="INSUMO" style="font-size: large; color: #960818"></asp:Label>
 </asp:Panel>
  
 <asp:Panel ID="PanelButtom" runat="server" Visible="false"
  BackColor="white">
    
  
              <table  width="100%">
                 <tr>
                 <td  width="80%">
                   <table >
<tr>
<td>
    <asp:Button ID="refreshButton" runat="server" Text="Restablecer" CssClass="ms-crm-List-Header"   Font-Size="X-Small"
        onclick="refreshButton_Click"    /></td>
<td>
    <asp:Button ID="EditarButton" runat="server" Text="Editar"  Font-Size="X-Small" CssClass="ms-crm-List-Header" 
        onclick="EditarButton_Click"    /></td>
<td>
    <asp:Button ID="nuevoButton" runat="server" Text="Nuevo"  Font-Size="X-Small" CssClass="ms-crm-List-Header" 
        onclick="nuevoButton_Click"  /></td>
        <td></td>
 <td>
    <asp:Button ID="EliminarButton" runat="server" Text="Eliminar" 
     OnClientClick="return confirm('Usted quiere eliminar?')"
    onclick="EliminarButton_Click" Font-Size="X-Small" CssClass="ms-crm-List-Header" 
        /></td> 
</tr>
</table>
                 </td>
                 <td>
                   <table align="left" >
            
            <tr>
                <td>
                    <asp:Button ID="anteriorButton" runat="server" Text="Anterior" OnClick="anteriorButton_Click"  CssClass="ms-crm-List-Header"  Font-Size="X-Small"/>
                </td>
                <td>
                    <asp:Button ID="siguienteButton" runat="server" Text="Siguiente" OnClick="siguienteButton_Click" CssClass="ms-crm-List-Header"  Font-Size="X-Small" />
                </td>
            </tr>
        </table>  
                 </td>
                 </tr>
                 </table>
               
       </asp:Panel>     
   <asp:Panel ID="pnlMain" runat="server" BackColor="white"
   Visible="false" >

    <input type="hidden" runat="server" name="internalid" id="internalid" />  
    <input type="hidden" runat="server" name="idPadre" id="idPadre" />        
      
  <table width="100%">
  
  
                <tr>
                <td align="right" width="100px"  >
                <asp:Label ID="claseLabel1" runat="server" Text="Clase:"></asp:Label></td>
                <td width="300px">
                <asp:Label ID="claseLabel" runat="server"></asp:Label>
                </td>
                    <td width="100px" align="right">
                        &nbsp;</td>
                    <td width="200px">
                        &nbsp;</td>
            </tr>
            <tr>
                <td   align="right" width="100px" >
                <asp:Label ID="familiaLabel1" runat="server" Text="Familia:"></asp:Label> </td>
                <td width="300px">
                
                <asp:Label ID="familiaLabel" runat="server"></asp:Label>
                
                </td>
                <td width="100px" align="right">
                    &nbsp;</td>
                <td width="200px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td   align="right" width="100px" >
                <asp:Label ID="subfamiliaLabel1" runat="server" Text="Sub Familia:"></asp:Label>
                
                </td>
                <td width="300px">
                 <asp:Label ID="subfamiliaLabel" runat="server"></asp:Label>
                </td>
                <td width="100px" align="right">
                    &nbsp;</td>
                <td width="200px">
                    &nbsp;</td>
            </tr>
            
            
        <tr>
            <td align="right" width="100px"   >
                Codigo:</td>
            <td class="style1" width="300px">
            <asp:UpdatePanel ID="panelCodigo" UpdateMode="Conditional" runat="server">
                <ContentTemplate>
                <b style="font-size:medium ;color: #960818"">  <asp:Label ID="codigoLabel" runat="server" ></asp:Label></b>
                
                </ContentTemplate>
                     </asp:UpdatePanel>
            </td>
            <td class="style1" width="100px" align="right">
                &nbsp;</td>
            <td class="style1" width="200px">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" width="100px"   >
                Descripcion:</td>
            <td class="style1" width="300px">
             <b style="font-size:medium"><asp:Label ID="descripcionLabel" runat="server" ></asp:Label></b>
                
            </td>
            <td class="style1" width="100px" align="right">
                Grupo:</td>
            <td class="style1" width="200px">
                <asp:LinkButton ID="grupoLabel" runat="server" onclick="grupoLabel_Click"></asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td align="right" width="100px"   >
                 
                    <asp:Label ID="unidadLabel1" runat="server" Text="Unidad:"></asp:Label></td>
            <td class="style1" width="300px">
                <asp:Label ID="unidadLabel" runat="server"></asp:Label>
            

            </td>
            <td class="style1" width="100px" align="right">
                &nbsp;</td>
            <td class="style1" width="200px">
                <asp:Label ID="tipoInsumoLabel" runat="server"></asp:Label>
            </td>
        </tr>
        
        
        <tr>
            <td align="right" width="100px"   >
                
                    <asp:Label ID="cuentaLabel1" runat="server" Text="Cuenta:"></asp:Label></td>
            <td class="style1" width="300px">
                <asp:Label ID="cuentaLabel" runat="server" Text=""></asp:Label>
            </td>
            <td class="style1" width="100px" align="right">
                Codigo S10:</td>
            <td class="style1" width="200px">
                <asp:Label ID="codigoS10" runat="server"></asp:Label>
            </td>
        </tr>
                <tr>
                    <td align="right" width="100px">
                         
                            <asp:Label ID="controlLabel" runat="server" Text="Control de Stock:"></asp:Label></td>
                    <td class="style1" width="300px">
                        <asp:CheckBox ID="controStockCheckBox" runat="server" Enabled="false" />
                    </td>
                    <td class="style1" width="100px" align="right">
                        Fecha Creacion:</td>
                    <td class="style1" width="200px">
                        <asp:Label ID="fechaCreLabel" runat="server"></asp:Label>
                    </td>
                </tr>
        <tr>
            <td align="right" width="100px"  >
                <asp:Label ID="revisadoLabel1"  runat="server" Text="Revisado:" 
                    style="font-weight: 700"></asp:Label>
            </td>
            <td class="style1" width="300px">
                <asp:CheckBox ID="revisadoCheckBox" runat="server" Enabled="false" />
            </td>
            <td class="style1" width="100px" align="right">
                Fecha Modificacion:</td>
            <td class="style1" width="200px">
                <asp:Label ID="fechaModLabel" runat="server"></asp:Label>
            </td>
        </tr>
    
    </table>

       <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1">
        <asp:TabPanel runat="server" HeaderText="SubGrupos" ID="subgrupoTabPanel">
        <ContentTemplate>
         <asp:Panel ID="Panel2" runat="server"
            Width="100%"          
                 Font-Size="X-Small"
                 font-names="Arial" >
        <uc2:InsumoListGrid ID="InsumoListGrid1" runat="server"  DataSourceID="InsumoDOS" /> 
     <asp:ObjectDataSource ID="InsumoDOS" runat="server" EnablePaging="True" 
        SelectCountMethod="Count" SelectMethod="getInsumoSubgrupo" SortParameterName="sortExpression"
        TypeName="BOL.InsumoBL">
         <SelectParameters>
            <asp:QueryStringParameter Name="idPadre" QueryStringField="id" />
            <asp:Parameter Name="startRowIndex" Type="Int32" />
            <asp:Parameter Name="maximumRows" Type="Int32" />
            <asp:Parameter Name="sortExpression" Type="String" />
        </SelectParameters>


     </asp:ObjectDataSource>

     </asp:Panel>
        </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel runat="server" HeaderText="Compras" ID="comprasTabPanel">
       <ContentTemplate>

            <asp:Panel ID="Panel3" runat="server"
            Width="100%"          
                 Font-Size="X-Small"
                 font-names="Arial" >
                 Compras Realizadas:
           
     <uc4:OrdenCompraInsumoGrid ID="OrdenCompraInsumoGrid1" runat="server" DataSourceID="insumoCompraODS" />
     
     
     <asp:ObjectDataSource ID="insumoCompraODS" runat="server" EnablePaging="True" 
        SelectCountMethod="Count" 
        SelectMethod="Execute" 
        SortParameterName="sortExpression"
        TypeName="BOL.Compras.GetOrdenCompraItemExcel">
         <SelectParameters>
            <asp:QueryStringParameter Name="idInsumo" QueryStringField="id" />
            <asp:Parameter Name="startRowIndex" Type="Int32" />
            <asp:Parameter Name="maximumRows" Type="Int32" />
            <asp:Parameter Name="sortExpression" Type="String" />
        </SelectParameters>
        </asp:ObjectDataSource>

                 

    </asp:Panel>
       </ContentTemplate>
        </asp:TabPanel>

 </asp:TabContainer>
       

                 </asp:Panel>

                   
    </form>
</body>
</html>
